﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Eis51.CampanyCMS.Model.NewsManager;
using Eis51.CampanyCMS.Business.NewsManager;
using Eis51.CampanyCMS.Model.NewsManager.QueryO;
using Eis51.CampanyCMS.Model;
using System.Collections;

namespace Eis51.Web.dataPage
{
    public partial class CustomerDT : System.Web.UI.Page
    {
        private int Seqno;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) {
                return;
            }
            if (!Check())
            {
                return;
            }
            LoadData();
        }

        private bool Check()
        {
            if (string.IsNullOrEmpty(Request.QueryString["seqno"]))
            {
                return false;
            }
            return true;
        }

        private void LoadData()
        {
            try
            {
                Seqno = int.Parse(Request.QueryString["seqno"]);
            }
            catch (Exception ex)
            {
                return;
            }
            LoadProduct();
        }

        private void LoadProduct()
        {
            Customer customer = CustomerBLL.GetInstance().Get(new Customer.Key(Seqno));
            if (null != customer)
            {
                divContent.InnerHtml = customer.Content;
            }
        }


    }
}
